Context-aware prosody correction of edited speech

ABSTRACT

Methods are performed by one or more processing devices for correcting prosody in audio data. A method includes operations for accessing subject audio data in an audio edit region of the audio data. The subject audio data in the audio edit region potentially lacks prosodic continuity with unedited audio data in an unedited audio portion of the audio data. The operations further include predicting, based on a context of the unedited audio data, phoneme durations including a respective phoneme duration of each phoneme in the unedited audio data. The operations further include predicting, based on the context of the unedited audio data, a pitch contour comprising at least one respective pitch value of each phoneme in the unedited audio data. Additionally, the operations include correcting prosody of the subject audio data in the audio edit region by applying the phoneme durations and the pitch contour to the subject audio data.

TECHNICAL FIELD

This disclosure generally relates to audio enhancement and, more specifically, to automatically correcting prosody in edited speech, such as when speech has been edited via a text-based speech editor or other technique.

BACKGROUND

People make various types of speech audio recordings in their daily lives. For instance, recording telephonic conferences, video blogs (vlogs), podcasts, videos to be posted on social media or placed elsewhere, voice messages, audiobooks, and others are among the recordings a person might make once or on a regular basis. In some cases, a user may wish to modify an existing speech audio recording, for instance, to remove or add words to make the audio fit a desired purpose. A common example includes editing a message on an automated conferencing system or other phone system (e.g., AVR or voicemail system) to modify the options provided to a call participant or to provide up-to-date information without needing to rerecord the entire applicable audio recording. Another common example is editing a speech audio track of a recorded presentation without having to rerecord the entire presentation. Various other scenarios and applications exist where speech audio recordings might require editing.

Conventional speech editors (including text-based speech editors) facilitate the process of editing speech audio recordings by permitting, in some cases, editing via intuitive cut, copy, and paste operations on a speech transcript. For instance, given the audio data encoding of the speech “the forecast calls for rain today” spoken by a specific speaker, a user might wish to replace “rain” with “clear skies” to accurately reflect the forecast for the day. The user could have access to a speech audio recording of that specific speaker representing the words “clear skies,” and in that case, the user could use a text-based speech editor to cut out the word “rain” and insert the words “clear skies” in its place, thus forming the phrase “the forecast calls for clear skies today.”

Although text-based speech editors provide an easy way to modify chunks of audio data, a drawback of text-based speech editors is prosody discontinuity. Specifically, edited audio data often sound unnatural at its cut points because of prosody mismatches at those cut points. Prosody refers to how words are spoken, such as in terms of pitch and rhythm. The prosody that a given speaker might apply to a phrase could differ depending on the context in which that phrase is spoken. As a result, simply pasting a phrase of one or more words spoken by a speaker into other audio of that speaker could lead to a mismatch in prosody, even though the speaker is unchanged. Thus, although techniques exist for cutting and pasting speech together, the resulting audio is still likely to sound cut and pasted, rather than sounding like a unified whole.

SUMMARY

In some embodiments, one or more processing devices perform operations to correct prosody in subject audio data within an edit region of an audio recording. For instance, the audio recording could be a speech audio recording, in which the subject audio data is speech audio data. The operations include predicting phoneme durations of the subject audio data in the edit region in a context-aware manner, predicting a pitch contour of the subject audio data in a context-aware manner, applying to the subject audio data a target prosody including the phoneme durations and the pitch contour, and removing artifacts from the subject audio data.

An example of a correction system described herein receives an indication of an edit region of an audio recording and an index that demarcates the edit region from an unedited audio portion of the audio recording. For example, the edit region may be a portion of audio recording that has been modified in some way, and the unedited audio portion is outside the edit region. The correction system applies a phoneme duration model to subject audio data in the edit region in the context of unedited audio data in the unedited audio portion to predict phoneme durations including a respective phoneme duration for each phoneme in the subject audio data. The correction system applies a pitch generation model to the subject audio data in the context of the unedited audio data to predict a pitch contour including at least one respective pitch value for each phoneme, given the phoneme durations, in the subject audio data. Together, the phoneme durations and the pitch contour form a target prosody for the subject audio data.

An example of the correction system uses a digital signal processing technique to apply the target prosody to the subject audio data in the edit region and, further, applies an artifact removal model to remove artifacts from the subject audio data introduced through the digital signal processing. The resulting version of the subject audio data is thus high-quality audio data that has prosodic continuity with the unedited audio data.

These illustrative embodiments are mentioned not to limit or define the disclosure, but to provide examples to aid understanding thereof. Additional embodiments are discussed in the Detailed Description, and further description is provided there.

BRIEF DESCRIPTION OF THE DRAWINGS

Features, embodiments, and advantages of the present disclosure are better understood when the following Detailed Description is read with reference to the accompanying drawings.

FIG. 1 is a diagram of an example architecture of a correction system for correcting prosody of subject audio data in an edit region of an audio recording, according to some embodiments described herein.

FIG. 2 is a diagram of an example of a process for correcting prosody of subject audio data in an edit region of an audio recording, according to some embodiments described herein.

FIG. 3 is a diagram of an example of a process for determining phoneme durations of phonemes in subject audio data in an edit region of an audio recording, according to some embodiments described herein.

FIG. 4 is a diagram of an example of a process for determining a pitch contour for subject audio data in an edit region of an audio recording, according to some embodiments described herein.

FIG. 5 is a diagram of an example of a computing system for performing certain operations described herein, according to some embodiments.

DETAILED DESCRIPTION

Existing systems to edit speech audio recordings come with significant drawbacks in terms of prosody. Specifically, existing systems typically do not or cannot account for variations in prosody when performing edited operations, such as cutting, copying, and pasting. As a result, edited speech often sounds like it has been edited, lacking a natural transition in prosody across cut points. Text-based speech editing methods are capable of performing cut, copy, and paste operations on audio data including speech at the phoneme level, but the resulting output audio data exhibits flattened prosody or boundary discontinuities.

Some embodiments described herein facilitate speech audio editing in a context-aware manner, such that prosody is automatically adjusted to produce natural sounding output audio data. For instance, given subject audio data including edited audio data in an audio recording, an example correction system described herein predicts, based on unedited audio data in an unedited portion of the audio recording, phoneme durations including a respective phoneme duration for each phoneme in the subject audio data. The correction system additionally divides the audio edit region into frames, or audio frames, and predicts a respective pitch for each such frame associated with the subject audio data. Given the pitches for the frames, the correction system can determine pitch contour including at least one respective pitch value for each phoneme in the subject audio data. Together, the phoneme durations and the pitch contour form a predicted prosody that is used as a target prosody for the subject audio data. Some embodiments then apply pitch-shifting and time-stretching, as well as artifact removal, to the subject audio data based on this target prosody, thus resulting in the subject audio data having prosodic continuity with the unedited portion of the audio recording.

The following non-limiting example is provided to introduce certain embodiments. In this example, a correction system for correcting prosody in subject audio data accesses (e.g., receives) input audio data. The input audio data is an audio recording that includes both unedited audio data in an unedited audio portion and subject audio data in an audio edit region of the audio recording. In this example, the subject audio data in the edit region was specified or modified using text-based speech editing, and thus, a transcript of the unedited audio portion and the audio edit region are available. Additionally, or alternatively, however, some other editing technique may be used. In that case, a speech-to-text technique may be used to provide a transcript of the audio edit region and the unedited audio portion.

In this example, the correction system predicts a duration of each phoneme in the subject audio data in the edit region, where the predicted duration is a prediction of the time to speak the phoneme based on the phoneme durations in the unedited audio data of the unedited audio portion. To this end, the correction system utilizes a machine learning (ML) model referred to herein as a phoneme duration model. The phoneme duration model is, for example, a neural network such as a sequence-to-sequence model. The correction system applies the phoneme duration model to the sequence of phonemes in the input audio data, including the subject audio data and the unedited audio data, as identified in the transcript. The phoneme duration model thus predicts and outputs a respective duration for each phoneme in the subject audio data.

Given the duration of each phoneme in the unedited audio data in the unedited audio portion and the predicted duration of each phoneme in the audio edit region, the correction system may use a second ML model, referred to herein as a pitch generation model, to predict a pitch contour for the subject audio data. More specifically, in this example, the correction system applies the pitch generation model to each frame of speech of a predetermined length (e.g., ten milliseconds) given the phoneme durations. The pitch generation model thus predicts and outputs a respective pitch for each frame of the audio edit region. Together, the duration and pitch of the subject audio data, as predicted by the phoneme duration model and the pitch generation model, form a target prosody for the subject audio data.

In this example, the correction system applies the target prosody to the subject audio data. To this end, the correction system uses a digital signal processing (DSP) technique for pitch-shifting and time-stretching, such as a DSP-based vocoder (i.e., a synthesizer that produces an audio signal based on input data). In some instances, the DSP technique introduces audio artifacts, such as noise or reverberation, into the subject audio data. As such, in this example, the correction system applies an artifact removal model, which may be a trained neural network designed to reduce such audio artifacts. The resulting subject audio data has prosodic continuity with the unedited audio data in the unedited audio portion due to the context-aware determination of the target prosody for the subject audio data. Thus, when the subject audio data is combined with the unedited audio data, the prosody across the cut points of that combination has a natural sound.

Certain embodiments described herein represent improvements in the technical field of audio enhancement. Specifically, some embodiments utilize novel techniques of predicting phoneme duration and pitch contour so as to predict a target prosody for subject audio data in an audio edit region. These novel techniques determine high-level control parameters describing how to perform digital signal processing to manipulate time and pitch of the subject audio data, so as to approximate neighboring unedited audio portions of the cut points around the audio edit region. In existing systems, DSP techniques for pitch-shifting and time-stretching typically create undesirable artifacts and usually require separate training for each speaker of audio data to be operated on. In contrast, some embodiments described herein do not require training per speaker and, further, address undesirable artifacts by applying artifact removal techniques such as through the use of an ML model trained for this purpose. Existing systems for audio enhancement enable audio editing but fail to do so in a manner that effectively adjusts prosody based on context for prosodic continuity in a high-quality result. Thus, embodiments described herein represent an improvement over such systems.

Referring now to the drawings, FIG. 1 is a diagram of an example architecture of a correction system 100 for correcting prosody in subject audio data, according to some embodiments described herein. As shown in FIG. 1 , some examples of the correction system 100 include one or both of a training system 110 and an operations system 120. In general, the training system 110 performs initialization tasks such as training ML models used by the operations system 120, and the operations system 120 operates on audio data to determine and apply a target prosody. In some embodiments, the training system 110 performs a set of operations once for initialization or as needed to update the ML models, and the operations system 120 performs a set of operations on input audio data 105 each time it is desired to correct the prosody of subject audio data in an edit region.

In some embodiments, the operations system 120 receives a request to correct the prosody of subject audio data in an edit region of the input audio data 105 in an audio recording. Although some embodiments described herein are particularly suited to audio recordings that are speech audio and thus include speech audio data, in other embodiments, the audio recording could fall into other categories, such as audio that involves rapping or singing within a flattened range. The edit region, also referred to herein as the audio edit region, can be a region of the audio recording that has been, or is flagged to be, edited. The edit region includes subject audio data, which can include edited audio data but may additionally include a portion of audio data that has not been edited but is adjacent to the edited audio data and is being treated as a common region with the edited audio data. In some embodiments, the input audio data 105 additionally includes unedited audio data in an unedited audio portion of the audio recording, where the unedited audio portion is outside of the edit region. In some examples, the unedited audio portion includes a combination of audio adjacent to the edit region on one side of the edit region and additional audio adjacent to the edit region on the other side of the edit region. As described below, some embodiments use the unedited audio portion as a reference in correcting the prosody of the subject audio data in the edit region.

In some embodiments, the edit region is located at a specific position, or index, of the input audio data 105. Thus, the subject audio data differs from audio data that was originally recorded or previously existed at the position of the audio edit region. In some embodiments, a client device 130 makes the request to the operations system 120. The client device 130 may be a separate device from the operations system 120, or alternatively, the operations system 120 is integrated with the client device 130 in whole or in part. For instance, the operations system 120 may run as an application on the client device 130. To initiate the request for prosody correction, a user could edit audio data at the client device 130 using an audio editing program 135, which may implement a text-based speech editing technique or other form of audio editing. Through such editing, the client device 130 generates the subject audio data. The client device 130 then communicates the edited audio recording, or at least the subject audio data, to the operations system 120 as input audio data 105 along with a request to correct the prosody of the subject audio data in the context of the input audio data 105 and, more specifically, in the context of the unedited audio data in the unedited audio portion of the audio recording.

The operations system 120 may include, or may otherwise access, one or more of the following, which act as subsystems of the operations system 120: a phoneme duration model 150 b, a pitch generation model 160 b, a prosody application subsystem 170, and an artifact removal model 180 b. In response to the request received by the operations system 120, an example of the phoneme duration model 150 b determines (e.g., predicts), based on the context of the unedited audio portion, a respective duration (e.g., in seconds) for each phoneme in the subject audio data of the edit region. Given the phonemes of the subject audio data and their associated durations as predicted by the phoneme duration model 150 b, and further based on the context of the unedited audio portion, an example of the pitch generation model 160 b determines (e.g., predicts) a respective pitch for each audio frame of the edit region. The operations system 120 can then assign a respective pitch to each phoneme of the subject audio data in the edit region according to which audio frame includes that phoneme. Together, the predicted phoneme durations and pitches of the phonemes of the subject audio data form a target prosody for the subject audio data, and an example of the prosody application subsystem 170 applies that target prosody to the subject audio data. This application may introduce some undesirable artifacts such as noise or reverberation, and thus, an example of the artifact removal model 180 b removes such artifacts. These operations will be described in more detail below.

The operations system 120 may output the subject audio data, modified as described above, as output audio data 195 to enable the client device 130 to combine that output with the unedited audio portion of the audio recording. Additionally or alternatively, the operations system 120 may provide output audio data 195 that includes the subject audio data, as modified, along with the unedited audio data.

In some embodiments, prior to initial operation of the operations system 120, the training system 110 operates on one or more of the following ML models, also referred to herein as models, for the purpose of training these models: the phoneme duration model 150 a, the pitch generation model 160 a, and the artifact removal model 180 a. In some examples, the training system 110 trains each of the phoneme duration model 150 a, the pitch generation model 160 a, and the artifact removal model 180 a individually. Additionally or alternatively, in some examples, one or more of these ML models may be trained outside of the correction system 100 rather than being trained by the training system 110 as shown in FIG. 1 . After training, the trained versions of each of the phoneme duration model 150 b, the pitch generation model 160 b, and the artifact removal model 180 b are accessible to the operations system 120 to enable the operations system 120 to use these models to correct prosody as described herein.

In some embodiments, the phoneme duration model 150 b is an ML model such as a neural network. During operation, the phoneme duration model 150 b inputs phonemes that have been extracted from the subject audio data and, in some examples, one-hot encoded. The phoneme duration model outputs, for each phoneme, a duration based on the context of the unedited audio portion. The duration may be output in terms of seconds and may be upper-bounded (e.g., at half a second) to prevent long silences in the final edit region.

An example of the phoneme duration model 150 b is implemented as a sequence-to-sequence model including an encoder and decoder. For example, the encoder is or includes two one-dimensional (1D) convolution blocks followed by a bidirectional gated recurrent unit (GRU). Each convolution block includes of a convolution with 512 channels and a kernel size of 5, rectified linear (ReLU) activation, and batch normalization. For example, the decoder is or includes a unidirectional GRU with 256 channels followed by a linear layer.

During training, an example of the phoneme duration model 150 a learns to minimize the mean-squared error between real-valued phoneme durations predicted and ground truth durations extracted with, for instance, the Penn Phonetic Forced Aligner. In some embodiments, the training system 110 trains the phoneme duration model 150 a in a single-speaker fashion on each dataset. For this purpose, a dataset may include two hours of speech for training and two hours for validation. The training system 110 may train the phoneme duration model 150 a for thirty epochs with a batch size of sixty-four. Further, during training, an embodiment of the training system 110 randomly provides short sequences of ground truth phoneme durations as input features. To this end, the training system 110 may randomly select half of the training samples to have k adjacent ground truth durations, where k˜Uniform(0, 24), so that the model learns to fill in remaining durations in a context-aware manner.

In some embodiments, the pitch generation model 160 b is an ML model such as a neural network and, more specifically, such as a sequence-to-sequence model. The pitch generation model 160 b may receive as input a sequence of phonemes divided into audio frames based on their respective durations, as determined by the phoneme duration model 150 b. Each audio frame may have the same time length, such as ten milliseconds, and the pitch generation model 160 b generates a pitch, also referred to as a pitch value, for each such audio frame based on the context of the audio portion.

In some embodiments, during training, the pitch generation model learns to predict respective pitches of audio frames, given a sequence of phonemes associated with respective durations. Ground truth pitch values for use in training may be extracted using, a pitch tracker (e.g., Crepe pitch tracker). To reduce double and half frequency errors, some embodiments of the training system 110 decode the pitch from a sequence of categorical distributions, such as those predicted by Crepe using Viterbi decoding. The training system 110 may extract and identify voiced and unvoiced tokens, such as by performing hysteresis thresholding on Crepe's network confidence value.

An example of the pitch generation model 160 b is or includes the Controllable DAR (C-DAR) model for pitch generation. C-DAR generates a pitch value for each ten-millisecond frame of speech from one-hot encoded phonemes and linguistic features that have been upsampled according to input phoneme durations. C-DAR predicts a categorical distribution over a discrete set of possible pitch values, such as 128 possible pitch values that are evenly distributed between −4 and +4 standard deviations from a speaker's average pitch in base-2 log-space.

As mentioned above, the prosody application subsystem 170 may apply the target prosody, as determined by the phoneme duration model 150 b and the pitch generation model 160 b, to the subject audio data in the edit region. In some embodiments, the prosody application subsystem 170 takes as input the phoneme durations, the pitch contour, and the subject audio data (e.g., a waveform). In accordance with the target prosody, the operations system 110 provides to the prosody application subsystem 170 pitch values and a time-stretching rate for each audio frame of the edit region, where the time-stretching rate is a sequence of ratios between the original phoneme durations of the subject audio data and the predicted phoneme durations, each repeated by the number of audio frames occupied by the original phoneme. The prosody application subsystem 170 outputs the subject audio data (e.g., another waveform), which has been adjusted to more closely match the target prosody.

In some embodiments, the prosody application subsystem 170 can but need not be an ML model, and if the prosody application subsystem 170 is not an ML model, the prosody application subsystem 170 need not be trained by the training system 110. In some embodiments, the prosody application subsystem 170 is or includes a DSP technique. To apply the target prosody to the subject audio data, the prosody application subsystem 170 performs pitch-shifting and time-stretching, such as, for example, through the use of a vocoder such as Time-Domain Pitch-Synchronous Overlap-and-Add (TD-PSOLA). Although the prosody application subsystem 170 could additionally or alternatively use the WORLD vocoder, TD-PSOLA tends to provide superior naturalness and pitch-shifting capabilities in experimentation. TD-PSOLA works by pitch-tracking the signal representing the subject audio data to determine locations (i.e., pitch epochs) to split the signal into chunks corresponding to periods. These chunks are then repeated to perform time-stretching, or the chunks are shifted to modify the potential overlap with adjacent chunks to perform pitch-shifting. The modified chunks are combined via Overlap-Add to create the pitch-shifted and time-stretched speech signal of the subject audio data.

In some embodiments, the DSP technique used by the prosody application subsystem 170 introduces artifacts into the subject audio data, and the artifact removal model 180 b removes or reduces such artifacts. During operation, the artifact removal model 180 b takes as input the subject audio data, as output by the prosody application subsystem 170, and outputs a modified version of the subject audio data that approximates the target prosody and has reduced artifacts as compared to the version output by the prosody application subsystem 170. Specifically, for instance, the modified version has reduced noise, reverberation, or a combination of noise or reverberation. To this end, during training, the artifact removal model 180 a learns to remove artifacts, such as noise and reverberation from audio data. The artifact removal model 180 a may be an ML model such as a neural network, and the training system 110 may train the artifact removal model 180 a to map audio data with artifacts to cleaner audio data.

An example of the artifact removal model 180 a is or includes HiFi-GAN, a neural network trained with a generative adversarial network (GAN) loss so as to learn to transform noisy or reverberant speech recordings to clean, high-fidelity speech. In other words, the artifact removal model 180 a is trained as a generator and, as such, is trained jointly with a discriminator in the context of a GAN. In the GAN, the artifact removal model 180 a learns to generate modified audio data that has a reduction in noise or reverberation as compared to corresponding audio data provided as input. Specifically, an example of the artifact removal model 180 a is or includes HiFi-GAN as described in Jiaqi Su et al., “HiFi-GAN: High-fidelity denoising and dereverberation based on speech deep features in adversarial network,” arXiv preprint arXiv:2006.05694 (2020), which is incorporated by reference herein. While HiFi-GAN is typically trained only to perform speech denoising and dereverberation, the model can still be effective at reducing the artifacts introduced by pitch-shifting and time-stretching. HiFi-GAN need not be trained in a speaker-dependent manner and is thus speaker agnostic. Thus, the use of HiFi-GAN or a similar model enables the correction system 100 to avoid using complex, speaker-dependent neural vocoders that can be difficult to implement for interactive applications. Additionally, HiFi-GAN typically operates in real time or faster, which makes it well suited for interactive applications.

FIG. 2 is a diagram of an example of a process 200 for correcting the prosody of subject audio data in an edit region of an audio recording, according to some embodiments described herein. The process 200 depicted in FIG. 2 may be implemented in software executed by one or more processing units of a computing system, implemented in hardware, or implemented as a combination of software and hardware. This process 200 is intended to be illustrative and non-limiting. Although FIG. 2 depicts various processing operations occurring in a particular order, the particular order depicted is not required. In certain alternative embodiments, the processing may be performed in a different order, some operations may be performed in parallel, or operations may be added, removed, or combined together.

As shown in FIG. 2 , at block 205, the process 200 may involve training each ML model that requires training. The ML models can include one or more of the phoneme duration model 150 a, the pitch generation model 160 a, and the artifact removal model 180 a, and in some embodiments, the training system 110 trains each of such models that require training and does so prior to correcting the prosody of any subject audio data in an edit region. In some embodiments, one or more ML models of the correction system 100 are trained outside of the correction system 100 and thus need not be trained by the training system 110. This training need not be performed for each prosody correction needed but, rather, may be performed once as an initialization operation or as needed to refine the ML models.

At block 210, the process 200 involves receiving a request to correct the prosody of subject audio data in an edit region, where the request indicates a position of the edit region in the audio recording. The operations system 110 may then access the subject audio data in the edit region and the unedited audio data in the unedited audio portion of the audio recording to perform the operations described below. In some embodiments, the subject audio data has already been inserted into the audio edit region, but this need not be the case. In either case, when inserted into the audio recording at the indicated position, the edit region along with the unedited audio portion form input audio data 105 to be operated on as described below.

At block 215, the process 200 involves determining phoneme durations including a respective phoneme duration for each phoneme in the subject audio data specified in the request received at block 210. In some embodiments, as described further below, the operations system 120 determines the phoneme durations by applying the phoneme duration model 150 b to a sequence of phonemes extracted from the input audio data 105 (i.e., both the subject audio data and the unedited audio portion). The phoneme duration model 150 b outputs the respective durations of each phoneme in the subject audio data. This operation will be described in more detail below, with reference to FIG. 3 .

At block 220, the process 200 involves determining a pitch contour, including at least one respective pitch for each phoneme of the subject audio data. In some embodiments, as described further below, the operations system 120 determines the pitch contour by applying the pitch generation model 160 b to audio frames of the input audio data 105, in which the subject audio data is now assumed to have the phoneme durations determined at block 215. Based on the pitches predicted for the various audio frames, the operations system 110 can assign a respective pitch value to each phoneme of the subject audio data. This operation will be described in more detail below, with reference to FIG. 4 .

In this disclosure, prosody refers to a combination of pitch and phoneme duration. Thus, the phoneme durations determined at block 215 and the pitch contour determined at block 220 together form a target prosody for the subject audio data.

At block 225, the process 200 involves receiving a user input and modifying a phoneme duration or pitch value, as determined at block 215 or 220, based on the user input. For instance, the audio editing application 135 at the client device 130 may present the user with a user interface, through which the user may specify respective durations or pitch values of specific phonemes, such as by adjusting the phoneme durations or pitch values that were automatically determined as described above. In one example, the operations system 120 generates a variety of candidate phoneme durations or pitch values for a phoneme and allows the user to select one of such candidates for use. In some embodiments, if the user input specifies a phoneme duration for a phoneme of the subject audio data in the edit region, that phoneme duration replaces the predicted phoneme duration for the phoneme. Analogously, if the user input specifies a pitch value for a phoneme of the subject audio data, that pitch value replaces the predicted pitch value for the phoneme. Further, in some embodiments, if the user input specifies values for phoneme duration, pitch, or both for only a subset of the phonemes in the subject audio data, rather than for all phonemes in the subject audio data, then the operations system 120 may re-predict the phoneme durations and pitch values of the remaining phonemes of the subject audio data to ensure prosodic continuity.

In some embodiments, a user of the client device 130 is enabled to provide such a user input before the predictions of phoneme durations and pitch contour are performed at block 215 and 220. In that case, if a user input is received that indicates respective phoneme durations and pitch values for all phonemes of the subject audio data, then the operations system 120 may use the user input in place of performing the predictions of blocks 215 and 220. However, if the user input specifies values for phoneme duration, pitch, or both for only a subset of the phonemes in the subject audio data, the operations system 120 may predict the phoneme durations and pitch values of the remaining phonemes of the subject audio data to ensure prosodic continuity.

At block 230, the process 200 involves applying the target prosody to the subject audio data to match, or at least more closely match, the target prosody determined at blocks 215-225. To this end, in some embodiments, the prosody application subsystem 170 of the operations system 120 performs pitch-shifting and time-stretching through digital signal processing. In some examples, the prosody application subsystem 170 is or utilizes TD-PSOLA to implement the pitch-shifting and time shifting. Additionally or alternatively, the prosody application subsystem 170 is or utilizes a different DSP technique or a neural vocoder.

At block 235, the process 200 involves removing artifacts from the subject audio data produced at block 230. To this end, for instance, the operations system 120 applies the artifact removal model 180 b to the modified subject audio data in the edit region. At block 240, the operations system 120 outputs the modified subject audio data. In outputting the modified subject audio data, the operations system 120 may output audio data 195 that includes both the unedited audio data in the unedited audio portion and the subject audio data, modified as described above, in edit region.

FIG. 3 is a diagram of an example of a process 300 for determining phoneme durations of phonemes in the subject audio data in the edit region, according to some embodiments described herein. In some embodiments, this process 300 is performed by the operations system 120 and involves the phoneme duration model 150 b. The operations system 120 can use this process 300 or similar to implement block 215 of the above process 200 illustrated in FIG. 2 . The process 300 depicted in FIG. 3 may be implemented in software executed by one or more processing units of a computing system, implemented in hardware, or implemented as a combination of software and hardware. This process 300 is intended to be illustrative and non-limiting. Although FIG. 3 depicts various processing operations occurring in a particular order, the particular order depicted is not required. In certain alternative embodiments, the processing may be performed in a different order, some operations may be performed in parallel, or operations may be added, removed, or combined together.

As shown in FIG. 3 , at block 305, the process 300 involves accessing input audio data 105 including an unedited audio portion and an edit region inserted at an indicated position in the input audio data 105. As discussed above, the correction system 100 is configured to correct the prosody of subject audio data in the edit region based on the context of unedited audio data in the unedited audio portion.

At block 310, the process 300 involves determining a transcript for the input audio data 105. In some embodiments, the subject audio data was generated on the client device 130 through text-based speech editing, and in that case, a transcript is known at the client device 130 and could be provided as part of the request to correct the prosody. Additionally or alternatively, however, the operations system 120 may utilize a speech-to-text technique to determine the transcript.

At block 315, the process 300 involves extracting and encoding phonemes in the input audio data 105. Various techniques exist for extracting phonemes from a transcript of speech, and the operations system 120 may use one or more of such techniques. For instance, the operations system 120 may use a grapheme-to-phoneme conversion to convert the transcript determined at block 305 to a sequence of phonemes in the input audio data 105 and, more specifically, in the subject audio data in edit region and the unedited audio data in unedited audio portion. In some embodiments, encoding the phonemes converts each phoneme into a corresponding numerical representation that encodes, or represents, that phoneme. The operations system 120 may perform one-hot encoding of the phonemes based on linguistic features, but other encoding techniques may be used additionally or alternatively.

At block 320, the process 300 involves applying the phoneme duration model 150 b to the sequence of encoded phonemes and their associated initial durations. In the case of the phonemes from the unedited audio data in the unedited audio portion, the actual durations of such phonemes may be input into the phoneme duration model 150 b. In the case of the phonemes from the subject audio data in the edit region, however, the durations may be masked, such as by being zeroed out. As discussed above, the phoneme duration model 150 b may be sequence-to-sequence model and thus may consider the context of each input within the sequence. Because the phoneme duration model 150 b is applied to a sequence of phonemes including both the subject audio data and unedited audio data, the predicted phoneme durations are determined based on that larger context. In some embodiments, the phoneme duration model 150 b outputs a sequence of predicted phoneme durations that correspond to the input encoded phonemes. An example of the operations system 120 discards the predicted phoneme durations output for phonemes in the unedited audio data but keeps the predicted phoneme durations for phonemes of the subject audio data for use in the remainder of this process 300.

At block 325, the process 300 involves outputting the predicted phoneme durations of the phonemes in the subject audio data. These phonemes are thus incorporated in the target prosody for the subject audio data.

FIG. 4 is a diagram of an example of a process 400 for determining a pitch contour for the subject audio data in the edit region, according to some embodiments described herein. In some embodiments, this process 400 is performed by the operations system 120 and involves the pitch generation model 160 b. The operations system 120 can use this process 400 or similar to implement block 220 of the above process 200 illustrated in FIG. 2 . The process 400 depicted in FIG. 4 may be implemented in software executed by one or more processing units of a computing system, implemented in hardware, or implemented as a combination of software and hardware. This process 400 is intended to be illustrative and non-limiting. Although FIG. 4 depicts various processing operations occurring in a particular order, the particular order depicted is not required. In certain alternative embodiments, the processing may be performed in a different order, some operations may be performed in parallel, or operations may be added, removed, or combined together.

As shown in FIG. 4 , at block 405, the process 400 involves accessing input audio data 105 including an unedited audio portion and an edit region inserted at an indicated position in the input audio data 105. At block 410, the process 400 involves accessing the phoneme durations of each phoneme in the input audio data 105. The phoneme durations include the original phoneme durations from the unedited audio data in the unedited audio portion and the predicted phoneme durations for the subject audio data in the edit region.

At block 415, the process 400 involves dividing the input audio data 105 into intervals, referred to herein as frames or audio frames. For the purpose of identifying the audio frames, each phoneme in the subject audio data may have the predicted duration predicted for that phoneme as described above, while the phonemes in the unedited audio data (i.e., outside the edit region) may have their original phoneme durations. In some examples, the audio frames are equal length, and for instance, each audio frame has a duration of ten milliseconds. However, various implementations are within the scope of this disclosure. In some embodiments, an audio frame at a boundary (e.g., at the cut points around the edit region, or at the beginning or end of the unedited audio portion) may have a different length than other audio frames. Alternatively, however, the input audio data 105 may be padded as needed to ensure that all audio frames have an equal length.

At block 420, the process 400 involves applying the pitch generation model 160 b to the sequence of audio frames. In the case of an audio frame including a phoneme from the unedited audio data in the unedited audio portion, the actual pitch value of that phoneme may be input into the pitch generation model 160 b. In the case of an audio frame including a phoneme from the subject audio data in the edit region, however, the pitch value for that audio frame may be masked, such as by being zeroed out. Given this input data, which includes the context of pitch values in the unedited audio data of the unedited audio portion, the pitch generation model 160 b may then predict a respective pitch for each audio frame in the input audio data 105.

Each phoneme in the subject audio data may be associated with (i.e., assigned to) at least one pitch value according to the respective pitches of the audio frames determined at block 420. Generally, a phoneme is associated with an audio frame that includes that phoneme. In some cases, a phoneme may cross over audio frames and may thus have, and be associated with, multiple pitch values if pitch varies across such audio frames. A set of pitch values associated with a phoneme can form a pitch curve representing the variation in pitch values as well as the duration of each such pitch value throughout the duration of the phoneme.

In some embodiments, the pitches of the phonemes in the unedited audio data in the unedited audio portion may remain unchanged, regardless of the predictions made at block 420, and only the pitches in the subject audio data in the edit region are impacted by the output of pitch generation model 160 b.

At block 425, the process 400 involves outputting a pitch contour describing the variation in pitch across the subject audio data. In some embodiments, the pitch contour includes at least one pitch value per phoneme. Further, the pitch contour incorporates the phoneme durations, such as by including start and stop time points for each phoneme and for each respective pitch value. The pitch contour is thus incorporated in the target prosody for the subject audio data.

As discussed above, the phoneme durations determined in the process 300 of FIG. 3 and the pitches determined in the process 400 of FIG. 4 together form a target prosody for the subject audio data in the edit region. In some embodiments, the operations system 120 applies this target prosody to the subject audio data, such as by using the prosody application subsystem 170, and may remove artifacts from the subject audio data to generate modified subject audio data. The operations system 120 may output the modified subject audio data. In some embodiments, the operations system 120 outputs the modified subject audio data without the unedited audio portion, to enable the high-quality subject audio data to be combined with the unedited audio portion elsewhere, or the operations system 120 outputs output audio data 195 including the modified subject audio data in the edit region combined with the unedited audio data in the unedited audio portion. Various implementations are possible and are within the scope of this disclosure.

A suitable computing system or group of computing systems can be used for performing the operations described herein. For example, FIG. 5 depicts an example of a computing system 500 that can be used to execute the training system 110, the operations system 120, or various other aspects of the correction system described herein. In some embodiments, for instance, the computing system 500 executes all or a portion of the training system 110, the operations system 120, or both. In other embodiments, the computing system 500 executes the operations system 120, and an additional computing system, which may be outside the correction system 100, having devices similar to those depicted in FIG. 5 (e.g., a processor, a memory, etc.) executes the training system 110.

The depicted example of a computing system 500 includes a processor 502 communicatively coupled to one or more memory devices 504. The processor 502 executes computer-executable program code stored in a memory device 504, accesses information stored in the memory device 504, or both. Examples of the processor 502 include a microprocessor, an application-specific integrated circuit (“ASIC”), a field-programmable gate array (“FPGA”), or any other suitable processing device. The processor 502 can include any number of processing devices, including a single processing device.

The memory device 504 includes any suitable non-transitory computer-readable medium for storing data, program code, or both. A computer-readable medium can include any electronic, optical, magnetic, or other storage device capable of providing a processor with computer-readable instructions or other program code. Non-limiting examples of a computer-readable medium include a magnetic disk, a memory chip, a ROM, a RAM, an ASIC, optical storage, magnetic tape or other magnetic storage, or any other medium from which a processing device can read instructions. The instructions may include processor-specific instructions generated by a compiler or an interpreter from code written in any suitable computer-programming language, including, for example, C, C++, C#, Visual Basic, Java, Python, Perl, JavaScript, and ActionScript.

The computing system 500 may also include a number of external or internal devices, such as input or output devices. For example, the computing system 500 is shown with one or more input/output (“I/O”) interfaces 508. An I/O interface 508 can receive input from input devices or provide output to output devices. One or more buses 506 are also included in the computing system 500. The bus 506 communicatively couples one or more components of a respective one of the computing system 500.

The computing system 500 executes program code that configures the processor 502 to perform one or more of the operations described herein. The program code includes, for example, the phoneme duration model 150 b, the pitch generation model 160 b, the prosody application subsystem 170, the artifact removal model 180 b, or other suitable models, subsystems, or applications that perform one or more operations described herein. The program code may be resident in the memory device 504 or any suitable computer-readable medium and may be executed by the processor 502 or any other suitable processor. In some embodiments, both the training system 110 and the operations system 120 are stored in the memory device 504, as depicted in FIG. 5 . In additional or alternative embodiments, one or more of the training system 110 and the operations system 120 are stored in different memory devices of different computing systems. In additional or alternative embodiments, the program code described above is stored in one or more other memory devices accessible via a data network.

The computing system 500 can access the ML models of the correction system 100 or other models, datasets, or functions in any suitable manner. In some embodiments, some or all of one or more of these models, datasets, and functions are stored in the memory device 504 of a common computer system 500, as in the example depicted in FIG. 5 . In other embodiments, such as those in which the training system 110 is executed on a separate computing system, that separate computing system that executes the training system 110 can provide access to the ML models described herein to enable execution of the operations system 120 on the computing system 500. In additional or alternative embodiments, one or more programs, models, datasets, and functions described herein are stored in one or more other memory devices accessible via a data network.

The computing system 500 also includes a network interface device 510. The network interface device 510 includes any device or group of devices suitable for establishing a wired or wireless data connection to one or more data networks. Non-limiting examples of the network interface device 510 include an Ethernet network adapter, a modem, and the like. The computing system 500 is able to communicate with one or more other computing devices (e.g., a separate computing device acting as a client device 130) via a data network using the network interface device 510.

Numerous specific details are set forth herein to provide a thorough understanding of the claimed subject matter. However, those skilled in the art will understand that the claimed subject matter may be practiced without these specific details. In other instances, methods, apparatuses, or systems that would be known by one of ordinary skill have not been described in detail so as not to obscure claimed subject matter.

Unless specifically stated otherwise, it is appreciated that throughout this specification discussions utilizing terms such as “processing,” “computing,” “calculating,” “determining,” and “identifying” or the like refer to actions or processes of a computing device, such as one or more computers or a similar electronic computing device or devices, that manipulate or transform data represented as physical electronic or magnetic quantities within memories, registers, or other information storage devices, transmission devices, or display devices of the computing platform.

The system or systems discussed herein are not limited to any particular hardware architecture or configuration. A computing device can include any suitable arrangement of components that provide a result conditioned on one or more inputs. Suitable computing devices include multi-purpose microprocessor-based computer systems accessing stored software that programs or configures the computing system from a general purpose computing apparatus to a specialized computing apparatus implementing one or more embodiments of the present subject matter. Any suitable programming, scripting, or other type of language or combinations of languages may be used to implement the teachings contained herein in software to be used in programming or configuring a computing device.

Embodiments of the methods disclosed herein may be performed in the operation of such computing devices. The order of the blocks presented in the examples above can be varied—for example, blocks can be re-ordered, combined, and/or broken into sub-blocks. Certain blocks or processes can be performed in parallel.

The use of “adapted to” or “configured to” herein is meant as open and inclusive language that does not foreclose devices adapted to or configured to perform additional tasks or steps. Additionally, the use of “based on” is meant to be open and inclusive, in that a process, step, calculation, or other action “based on” one or more recited conditions or values may, in practice, be based on additional conditions or values beyond those recited. Headings, lists, and numbering included herein are for ease of explanation only and are not meant to be limiting.

While the present subject matter has been described in detail with respect to specific embodiments thereof, it will be appreciated that those skilled in the art, upon attaining an understanding of the foregoing, may readily produce alterations to, variations of, and equivalents to such embodiments. Accordingly, it should be understood that the present disclosure has been presented for purposes of example rather than limitation, and does not preclude the inclusion of such modifications, variations, and/or additions to the present subject matter as would be readily apparent to one of ordinary skill in the art. 

1. A method in which one or more processing devices perform operations comprising: accessing an audio recording comprising unedited audio data in an unedited audio portion and subject audio data in an audio edit region, wherein the unedited audio portion is distinct from the audio edit region; predicting, based on a context of the unedited audio data, phoneme durations comprising a respective phoneme duration of each phoneme in the subject audio data; predicting, based on the context of the unedited audio portion, a pitch contour comprising at least one respective pitch value of each phoneme in the subject audio data; and correcting prosody of the subject audio data by applying the phoneme durations and the pitch contour to the subject audio data.
 2. The method of claim 1, wherein predicting the phoneme durations comprises identifying each phoneme in the subject audio data based on a transcript of the subject audio data.
 3. The method of claim 1, wherein predicting the phoneme durations comprises applying, to each phoneme in the subject audio data, a sequence-to-sequence machine learning model comprising an encoder and a decoder.
 4. The method of claim 3, wherein the encoder comprises two one-dimensional convolution blocks and a bidirectional gated recurrent unit, and wherein the decoder comprises a unidirectional gated recurrent unit and a linear layer.
 5. The method of claim 3, wherein a speaker of the subject audio data and the unedited audio data is distinct from a set of speakers on which the sequence-to-sequence machine learning model for predicting the phoneme durations was trained.
 6. The method of claim 1, wherein predicting the pitch contour of the subject audio data comprises: dividing the audio edit region into equal-length audio frames; and generating a respective pitch value for the subject audio data in each equal-length audio frame of the audio edit region.
 7. The method of claim 6, wherein generating a respective pitch value for each equal-length audio frame of the audio edit region comprises applying a machine learning model to select the respective pitch value from a categorical distribution over a discrete set of pitch values.
 8. The method of claim 6, wherein a speaker of the subject audio data and the unedited audio data is distinct from a set of speakers on which the machine learning model for selecting the respective pitch value was trained.
 9. The method of claim 1, wherein applying the phoneme durations and the pitch contour to the subject audio data comprises performing digital signal processing on the subject audio data.
 10. The method of claim 9, the operations further comprising applying an artifact removal model to the subject audio data after performing the digital signal processing on the subject audio data.
 11. The method of claim 9, the operations further comprising, after performing the digital signal processing on the subject audio data, applying to the subject audio data a neural network trained in a generative adversarial network to remove at least one of noise or reverberation from the subject audio data.
 12. A system comprising: a phoneme duration model configured to: receive input audio data comprising subject audio data in an audio edit region and unedited audio data in an unedited audio portion, wherein the subject audio data lacks prosodic continuity with the unedited audio data; and predict, based on a context of the unedited audio data, phoneme durations comprising a respective phoneme duration of each phoneme in the unedited audio data; a pitch generation model configured to predict, based on the context of the unedited audio data, a pitch contour comprising at least one respective pitch value of each phoneme in the subject audio data; and a digital signal processor configured to correct prosody of the subject audio data in audio edit region by applying the phoneme durations and the pitch contour to the subject audio data.
 13. The system of claim 12, further comprising a training system configured to train at least one of the phoneme duration model or the pitch generation model.
 14. The system of claim 12, further comprising an artifact removal subsystem configured to remove an audio artifact from the subject audio data output by the digital signal processor.
 15. A non-transitory computer-readable medium embodying program code for correcting prosody in audio data, the program code comprising instructions that, when executed by a processor, cause the processor to perform operations comprising: accessing input audio data comprising subject audio data in an audio edit region and unedited audio data in an unedited audio portion of an audio recording, wherein the subject audio data in the audio edit region lacks prosodic continuity with the unedited audio data in the unedited audio portion; applying a phoneme duration model to the input audio data to predict phoneme durations comprising a respective phoneme duration of each phoneme in the subject audio data in a context of the unedited audio data; applying a pitch generation model to the input audio data to predict a pitch contour comprising at least one respective pitch value for each phoneme in the subject audio data in the context of the unedited audio data; and correcting prosody of the subject audio data by utilizing digital signal processing to modify the subject audio data based on the phoneme durations and the pitch contour.
 16. The non-transitory computer-readable medium of claim 15, the operations further comprising receiving a user input indicating a manual adjustment to at least one of a phoneme duration or a pitch value of a phoneme in the subject audio data.
 17. The non-transitory computer-readable medium of claim 16, the operations further comprising predicting an updated set of phoneme durations for the subject audio data based on the user input.
 18. The non-transitory computer-readable medium of claim 16, the operations further comprising predicting an updated pitch contour for the subject audio data based on the user input.
 19. The non-transitory computer-readable medium of claim 15, wherein the phoneme duration model comprises a sequence-to-sequence machine learning model comprising an encoder and a decoder.
 20. The non-transitory computer-readable medium of claim 15, the operations further comprising applying an artifact removal model to an output of the digital signal processing. 